\newproblem{lay:6_5_1}{
  % Problem identification
	\begin{large}
	  \hspace{\fill}\newline
    \textbf{Lay, 6.5.1}
	\end{large}
	\\
  \ifthenelse{\boolean{identifyAuthor}}{\textit{Carlos Oscar Sorzano, Aug. 31st, 2013} \\}{}

  % Problem statement
	Find a least-squares solution of $A\mathbf{x}=\mathbf{b}$ by constructing the normal equations for $\hat{\mathbf{x}}$ and solving for it with
	$A=\begin{pmatrix}-1 & 2\\ 2 & -3 \\ -1 & 3\end{pmatrix}$ and $\mathbf{b}=\begin{pmatrix}4\\1\\2\end{pmatrix}$.
}{
   % Solution
	The normal equations are given by 
	\begin{center}
		$A^TA\hat{\mathbf{x}}=A^T\mathbf{b}$
	\end{center}
	In this particular case
	\begin{center}
		$\begin{pmatrix}-1 & 2 & -1 \\ 2 & -3 & 3\end{pmatrix}\begin{pmatrix}-1 & 2\\ 2 & -3 \\ -1 & 3\end{pmatrix}\hat{\mathbf{x}}=
		   \begin{pmatrix}-1 & 2 & -1 \\ 2 & -3 & 3\end{pmatrix}\begin{pmatrix}4\\1\\2\end{pmatrix}$\\
		$\begin{pmatrix}6 &-11\\ -11 & 22\end{pmatrix}\hat{\mathbf{x}}=\begin{pmatrix}-4 \\ 11\end{pmatrix}$\\
		$\hat{\mathbf{x}}=\begin{pmatrix}6 &-11\\ -11 & 22\end{pmatrix}^{-1}\begin{pmatrix}-4 \\ 11\end{pmatrix}=\begin{pmatrix}3 \\ 2\end{pmatrix}$\\
	\end{center}
	
	Note that
	\begin{center}
		$A\hat{\mathbf{x}}=\begin{pmatrix}1 \\ 0 \\ 3\end{pmatrix}\neq \begin{pmatrix}4\\1\\2\end{pmatrix}=\mathbf{b}$
	\end{center}
	The error vector is
	\begin{center}
		$\mathbf{\epsilon}=\mathbf{b}-\hat{\mathbf{b}}=\begin{pmatrix}3\\1\\-1\end{pmatrix}$
	\end{center}
	and its norm
	\begin{center}
		$\sigma_\epsilon^2=\|\mathbf{\epsilon}\|=\sqrt{11}$
	\end{center}
}
\useproblem{lay:6_5_1}
\ifthenelse{\boolean{eachProblemInOnePage}}{\newpage}{}
